package com.liufei1988.jvm.reflect;

import java.lang.reflect.Method;

public class Test {
    public static void target(int i){
        System.out.println("::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: "+i);
        try {
            throw new Exception("#"+i);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) throws Exception{
        Class<?> klass=Class.forName("com.liufei1988.jvm.reflect.Test");
        Method method=klass.getMethod("target",int.class);
        for (int i=0;i<17;i++){
            method.invoke(null,i);
        }
    }
}
